/******************************************************************************
* DISCLAIMER:
* The software supplied by Renesas Technology Europe Ltd is
* intended and supplied for use on Renesas Technology products.
* This software is owned by Renesas Technology Europe, Ltd. Or
* Renesas Technology Corporation and is protected under applicable
* copyright laws. All rights are reserved.
*
* THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS,
* IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* APPLY TO THIS SOFTWARE. RENESAS TECHNOLOGY AMERICA, INC. AND
* AND RENESAS TECHNOLOGY CORPORATION RESERVE THE RIGHT, WITHOUT
* NOTICE, TO MAKE CHANGES TO THIS SOFTWARE. NEITHER RENESAS
* TECHNOLOGY AMERICA, INC. NOR RENESAS TECHNOLOGY CORPORATION SHALL,
* IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
* CONSEQUENTIAL DAMAGES FOR ANY REASON WHATSOEVER ARISING OUT OF THE
* USE OR APPLICATION OF THIS SOFTWARE.
******************************************************************************/

/* Copyright (C) 2011. ChengDu Unicon system, All Rights Reserved */

/*""FILE COMMENT""******************************* Technical reference data ****
* File Name	: resetprg.c
* Version 	: 1.00
* Device 	: SH72543
* Tool Chain 	: 
* H/W Platform	: 
* Description 	: Reset program
******************************************************************************/

/******************************************************************************
* History 	: 25.05.2011 Ver. 1.00 First Release
*		: 
*FILE COMMENT END*********************************************************/

/******************************************************************************
System Includes
******************************************************************************/
/* Following header file provides access to intrinsic functions to control 
interrupt levels. */
#include <machine.h>

/******************************************************************************
User Includes (Project Level Includes)
******************************************************************************/
/* Following header file provides macros & prototypes for the functions used 
in this file.	*/
#include "resetprg.h"
/* Following header file provides a structure to access on-chip I/O
registers. */
#include "io7254R.h"

/******************************************************************************
Compiler Directives
******************************************************************************/

/******************************************************************************
User Program Code
******************************************************************************/

/*""FUNC COMMENT""*************************************************************
* Outline     : __low_level_init
* Description : System startup
* Argument    : none
* Return value: none
*""FUNC COMMENT END""*********************************************************/

unsigned char __low_level_init(void)
{
  /* Initialize the hardware */	 
  HardwareSetup();

  /* Reset Status Register */ 
  set_cr(SR_Init);
  nop();

  /* Disable interrupt mask */
  set_imask(0);

  return 1;  
}
/******************************************************************************
End of function PowerON_Reset_PC
******************************************************************************/
